<!--智慧消防V1.0-info页面-->
<template>
  <div class="app-container" ref="content">
    <div style="text-align: center;padding: 10px">{{abnormalInfo.disPlayName}}-异常信息</div>
    <el-row :gutter="10">
      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
        <el-form v-model="abnormalInfo">
          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
            <el-form-item label="异常名称" prop="disPlayName">
              {{abnormalInfo.disPlayName}}
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
            <el-form-item label="申报人" prop="abnormalUserName">
              {{abnormalInfo.abnormalUserName}}
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
            <el-form-item label="异常描述信息" prop="remark">
              {{abnormalInfo.remark}}
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
            <el-form-item label="主体名称" prop="enterpriseName">
              {{abnormalInfo.enterpriseName}}
            </el-form-item>
          </el-col>
            <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                <el-form-item label="异常出发时间" prop="abnormalTime">
                    {{abnormalInfo.abnormalTime | dateFormat }}
                </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                <el-form-item label="异常状态" prop="abnormalStatus">
                    {{abnormalInfo.abnormalStatus==0?"异常":"正常"}}
                </el-form-item>
            </el-col>
        </el-form>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import {getInAbnormalVo} from "@/api/abnormal";

export default {
  name: "info",
  data(){
    return{
      abnormalInfo:{

      }
    }
  },
  created() {
    this.$nextTick(() => {
      this.getInAbnormalVo(this.$route.params.ucId)
    });
  },
  methods:{
    getInAbnormalVo(val){

      let loadingInstance = this.$loading({
        target:this.$refs.content,
        text:'数据加载中'
      });
      getInAbnormalVo({ucId:val}).then(res=>{
        console.log(res)
        this.abnormalInfo = res.data
        loadingInstance.close()
        this.$notify.success({
          title: '成功',
          message: "获取异常信息成功"
        })
      }).catch(error=>{
        console.log(error)
        loadingInstance.close()
        this.$notify.error({
          title: '失败',
          message: "获取异常信息失败"
        })
      })
    }
  }
}
</script>
